﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using DapperExtensions.Mapper;
using Newtonsoft.Json;
using ZilLion.Service.Core.Domain.EntityBase.JsonConverter;

namespace ZL.CRM.CommonEntity.AccOpr
{
    public class QianzhReturn
    {

        /// <summary>
        ///  本次消费：现金钱包
        /// </summary>
        public decimal Accbcxj { get; set; }

        /// <summary>
        ///  本次消费：增值钱包（不含红包）
        /// </summary>
        public decimal Accbczz { get; set; }

        /// <summary>
        ///  本次消费：红包
        /// </summary>
        public decimal Accbchb { get; set; }

        /// <summary>
        ///  最新折扣类别id
        /// </summary>
        public int Zklbid { get; set; }

        /// <summary>
        ///  最新折扣类别失效时间(读取缓存)
        /// </summary>
        [JsonConverter(typeof(ChinaDateTimeConverter))]
        public DateTime? Zklbshixrq { get; set; }

        /// <summary>
        ///  余额：现金金额（充值入-累计出）
        /// </summary>
        public decimal Acccashbalance { get; set; }

        /// <summary>
        ///  余额：增值金额（充值入-累计出）（不含红包）
        /// </summary>
        public decimal Accaddbalance { get; set; }

        public int Acckzid { get; set; }

        public long RemoveHbAccid { get; set; }

        /// <summary>
        /// 账户信息范围：1-手机号 2-生日 4-地址 8-称呼 16-证件号码 32-性别
        /// </summary>
        public int AccInfoRange { get; set; }

        //账户信息是否完整
        public short AccInfoIsCompelete { get; set; }

    }
    public class QianzhReturnMapper : ClassMapper<QianzhReturn>
    {
        public QianzhReturnMapper()
        {
            Table("#QianzhReturn");
            Map(f => f.Accbcxj).Column("Accbcxj");
            Map(f => f.Accbczz).Column("Accbczz");
            Map(f => f.Accbchb).Column("Accbchb");
            Map(f => f.Zklbid).Column("Zklbid");
            Map(f => f.Zklbshixrq).Column("Zklbshixrq");
            Map(f => f.Acccashbalance).Column("Acccashbalance");
            Map(f => f.Accaddbalance).Column("Accaddbalance");
            Map(f => f.Acckzid).Column("Acckzid");
            Map(f => f.RemoveHbAccid).Column("RemoveHbAccid");
            Map(f => f.AccInfoRange).Column("AccInfoRange");

        }

    }
}
